package vn.bang.xiangqi.server;

import java.io.IOException;
import java.net.DatagramSocket;
import java.net.SocketException;

import vn.bang.communication.CommandBuilder;
import vn.bang.communication.Communicator;

public class ClientTest {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		DatagramSocket clientSocket = new DatagramSocket();
		
		CommandBuilder builder = new CommandBuilder();
		builder.buildLogin("admin", "admin");
		
		Communicator com = new Communicator(clientSocket);
		com.sendCommand(builder.toCommand(), ServerSide.SERVER_IP_ADDRESS, ServerPort.LOGIN.getValue());
		
		com.close();
	}

}
